//
//  SDHTTPRequestOperation.h
//  SKinDiary
//
//  Created by pcyang on 16/6/26.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFHTTPRequestOperation.h"

typedef id (^SDHTTPRequestOperationParserBlock)(id data,NSError** error);


@interface SDHTTPRequestOperation : AFHTTPRequestOperation
@property (nonatomic,assign,readwrite)  BOOL    jsonParsed;
@property (nonatomic,strong,readwrite)  SDHTTPRequestOperationParserBlock   objectParserBlock;
@property (nonatomic,strong,readonly)   id      parsedObject;
@property (nonatomic,assign,readonly)   NSTimeInterval loadingTimeInterval;

@property (nonatomic,assign,readwrite)  BOOL    shouldReportNetworkLatency;
@property (nonatomic,strong,readwrite)  NSDictionary *requestCookies;

@property (nonatomic,strong,readwrite)   NSString* interfaceIdentifier;



@property(nonatomic,assign) NSTimeInterval  kconn_time;
@property(nonatomic,assign) NSTimeInterval  ktrans_time;
@property(nonatomic,strong) NSString        *kdomain;
@property(nonatomic,strong) NSString        *kcgi;
@property(nonatomic,assign) NSUInteger      kdata_len;

- (void)clearDelegatesAndCancel;
- (void)clearDelegates;
@end

